package net.zjitc.controller.client;


import net.zjitc.pojo.Cart;
import net.zjitc.pojo.User;
import net.zjitc.service.CartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @Author admin
 * @Date 2019/4/18 8:35
 */
@Controller
@RequestMapping("/userCart")
public class UserCartController {
    @Autowired
    CartService cartService;
    @RequestMapping("/mycart")
    public String mycart(HttpServletRequest request, Model model){
//        HttpSession session = request.getSession();
//        User user = (User) session.getAttribute("user");
//        List<Cart> cartList= (List<Cart>) cartService.findByUid(user.getId());
//        model.addAttribute("cartList",cartList);
       return "/client/cart.jsp";



    }
}
